<?php
/*
	插件初始化
*/
namespace jy_pingdd_pin;
defined('BY_JYA') or exit('error');
function init($plugin){
	//定义本场景的一些独立,为空表示共用电商客的
	$_SESSION['onemerchid']=$_SESSION['onemerchid']?:0;
	$plugin->weishop_order_detail='';
	$plugin->weishop_order_list='';
	$plugin->syscolor=$plugin->plugin_setting('basic')['syscolor']?:'#fd0303';
	$plugin->plugins=array();
	$plugin->team_status=array('0'=>'拼单中','1'=>'拼单成功','2'=>'拼单失败');
	$plugin->ding_status=array('0'=>'未支付','1'=>'拼单中','2'=>'拼单成功(待付尾款)','3'=>'拼单失败','4'=>'拼单失败(获得奖励)','5'=>'申请退款','6'=>'退款成功','7'=>'返现成功');
	$plugin->get_types=array('0'=>'团员收货','1'=>'团长收货');
	$plugin->member_status=array('0'=>'正常','1'=>'不正常');
	$plugin->jiqilog_status=array('0'=>'未支付','1'=>'已开通');
	$plugin->log_type=array('0'=>'参与信息','1'=>'预约信息','2'=>'开通机器人','3'=>'拼中信息','4'=>'额外奖励','5'=>'保证金操作','6'=>'分销佣金','7'=>'参与返现','8'=>'拼中奖励');
	$plugin->order_status=array(
		'0'=>'待付款',
		'1'=>'待发货',
		'2'=>'待收货',
		'3'=>'已完成',
		'4'=>'已关闭',
		'5'=>'待退款',
		'6'=>'已退款',
		'10'=>'拼单中',
		'-1'=>'已关闭',
	);
	$gift_type=array(
		'1'=>'积分',
	);
	$credit_types=credit_types();
	foreach($credit_types as $k=>$cv){
		if($k>2){
			$gift_type[$k]=$cv;
		}
	}
	$plugin->gift_type=$gift_type;
	$plugin->credit_type=$credit_types;
	$plugin->open_type=array('0'=>'按时间点自动开启','1'=>'不限时间');
	$plugin->times=array('0点','1点','2点','3点','4点','5点','6点','7点','8点','9点','10点','11点','12点','13点','14点','15点','16点','17点','18点','19点','20点','21点','22点','23点');
}